using UnityEngine;
using System.Collections;
using System;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;

public class SaveManager {
	public static void SaveGame(){
		string SavePath = Application.persistentDataPath;
		var test2 = new test();
		test2.i = 0;
		test2.b = 3;
		test2.t = "hello";
		IFormatter formatter = new BinaryFormatter(); 
		Stream stream  =  new FileStream(SavePath + "MyFile.bin",FileMode.Create,FileAccess.Write,FileShare.None); 
		formatter.Serialize(stream,test2);
		stream.Close();
	}
	
	[Serializable]
	public class test
	{
		public int i;
		public int b;
		public string t;
	}
}
